<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="a_vuejs/vue.global.js"></script>
</head>

<body>

<div id="myApp">
    <h3>v-model:一个地方将数据改变 该数据变量引用的地方所有都会改变</h3>
    message:{{message}}<br/>
    message:<span v-text="message"></span><br/>
    改变数据:<input type="text" v-model="message"><br/>
    <button v-on:click="login">登录</button>
</div>

</body>

<script>
    const app = Vue.createApp({
        data(){
            return{
                message:'v-mode双向数据绑定'
            }
        },
        methods:{
            login(){
                console.log('message:'+ this.message)
            }
        }
    }).mount('#myApp')
</script>

</html>